#include "header.h"

int loadall (char *path)
{
	int xsize;
	int ysize;
	FILE *mapfile;
	mapfile = fopen(path, 'r');
	fgets(xsize, 40, mapfile);
	fgets(ysize, 40, mapfile);
	for(i = 0; i < size; i++)
	{
		fgets(mysquare[i], 40, mapfile);
		fgets(mysquare[i], 40, mapfile);
		fgets(mysquare[i], 40, mapfile);
		fgets(mysquare[i], 40, mapfile);
	}
}

int initialize(int *buttons, char fullscreen) 
{
	if (allegro_init() != 0)
		return -1;
  	if (fullscreen) 
  	{
  		if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) != 0)
    			return -1;
    	}
    	else 
    	{
    		if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0) != 0)
    			return -1;
    	}
	if (install_keyboard() != 0)
  		return -1;
	if (install_timer() != 0)
		return -1;
  	if ((*buttons = install_mouse()) == -1)
    		return -1;
  	if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL) != 0)
    		return -1;
  	buffer = create_bitmap(SCREEN_W, SCREEN_H);
  		return 0;
}


int main(int argc, char** argv) 
{
	int mousebuttons;
	initialize(&mousebuttons, 1);
	if(mouse_b) // any button
	if(mouse_b & 1) //only left mouse button
	if(mouse_b & 2) //only right mouse button
}

